Before starting, ensure your ssh key is authorized to access kiss@kiss.hamwan.org.
sudo apt install -y git pandoc python2.7 python2-pip-whl python2-setuptools-whl virtualenv r-base r-cran-plotrix libnumber-bytes-human-perl libjson-perl bc rsync
sudo dnf install -y git pandoc python2.7 virtualenv python3-pip R-core perl-Number-Bytes-Human perl-JSON perl-XML-Twig rsync
echo 'install.packages("plotrix", repos="https://cloud.r-project.org/")' | sudo R --save
sudo firewall-cmd --add-port=8000/tcp
mkdir -p ~/.ssh
echo -e "Host kiss.hamwan.org\n HostKeyAlgorithms +ssh-rsa\n PubkeyAcceptedAlgorithms +ssh-rsa\n StrictHostKeyChecking=no" >> ~/.ssh/config
git clone kiss@kiss.hamwan.org:kiss.git
cd kiss
virtualenv -p `which python2.7` venv
. venv/bin/activate
pip install -r requirements.txt
./run_test_srv.sh
To exit the virtual environment type "deactivate".
Setup your git global variables.
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Create a branch to hold your proposed changes.
git checkout -b add-new-filename-page
Edit your files and commit your change.
vi src/filename.md
git add src/filename.md
git status
git commit
Push your changes to the KISS server for review and merging.
git push -u origin add-new-filename-page
Undoubtedly, someone will find fault with your initial changes and send you code review comments. Here's how to fix your commit and push the updated version. The commit --amend command will give you the option to update your previous commit message, but this is optional and the previous message can be let intact by saving without any update.
Just repeat the edit, add, status, commit, and push steps to incrementally update your branch until its finalized.
An email will be sent automatically to netops to review your new branch when you push. Once approved, it'll be merged into the master branch and your branch will be deleted. You can then safely delete your local branch.
git switch master
git branch -d add-new-filename-page
Read more about git here.
Find the commit that represents the changes you want to merge, typically from email, but could be from git log.
git checkout master
git pull
git checkout branch-to-merge
git pull
git diff master
If needed request clarification or changes.
git checkout master
There are two options here. If you just have a single commit to merge, then use Option A. If there are a set of commits in the branch, you may want to use Option B, which creates a single commit to master that combines all the commits.
Option A: standard merge:
get merge --no-commit ee4417f73047cec8c2c9c851b681f2de4cc36a2e
Option B: squash merge (to consolidate multiple commits)
If you want to use a squash approach, change your merge step to git merge --squash
, keeping the combined commit message git suggests in the git commit
step, and use git branch -D feature-branch
instead of git branch -d feature-branch
because git will complain the branch wasn't actually merged.
git merge --squash branch-to-merge
Check that the merge was clean, and if needed resolve or revert
git commit
git push
Remove the remote branch:
git push -d origin branch-to-merge
If you did a standard merge (Option A)
git branch -d update-site-hardware-docs # (remove the local branch)
If you did a squash merge (Option B), the original fine-grained feature commits might disappear from the repo at some point if you do this since they become orphaned. Reference article on squashing.
git branch -D update-site-hardware-docs